from duckduckgo_search import DDGS

# 使用旋转代理
ddgs = DDGS(timeout=20)
results = ddgs.text("python programming", max_results=10)
print(results)
